<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
	<script type="text/javascript">
var upWindow = window.parent.frames["zwIframe"];
if (!upWindow) {
    upWindow = window.parent.frames["componentDiv"].frames["zwIframe"];
    if (!upWindow) {
        upWindow = window.parent.frames["main"].frames["zwIframe"];
    }
}		function setUpFieldValue(name, value) {
			upWindow.$("[fieldval*='displayName:\"" + name + "\"']").find(
					"input").val(value);
			upWindow.$("[fieldval*='displayName:\"" + name + "\"']").find(
					"input").trigger("blur");
		}

		var success = "${success}";
		if (success === "true") {
			setUpFieldValue("姓名1", "${userName}");
			setUpFieldValue("工号1", "${code}");
			setUpFieldValue("岗位1", "${post}");
			setUpFieldValue("所在部门1", "${dep}");
			setUpFieldValue("进厂时间年月", "${reportDate}");
			var remainDays = "${remainDays}";
			if (remainDays == "") {
				alert("EHR系统中，用户的节余年假为空，请与所在公司人事部联系。");
			}
			setUpFieldValue("年休节余天数1",
					(remainDays.substr(0,1) == "." ? ("0"+remainDays) : remainDays));
			setUpFieldValue("截止时间1", "${nowTime}");
		} else {
			alert("未查找到人员信息，原因：\n1、OA账户的人员编号为空，或者不正确（工号6位数）；\n2、EHR系统中未给请假人排班。");
		}
    window.parent.$(".layui-layer-iframe").parent().find(".layui-layer-close").trigger("click");

	</script>
	<div style="text-align: center; padding-top: 30px;">loding……</div>
</body>
</html>